package com.smm.web.vmc.domain;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by zhenghao on 2016/8/26.
 * 标签对象 （有源RFID）
 */
@Entity
@Table(name="tag")
public class Tag implements Serializable {

    private String no;  //标签编号

    private Warehouse warehouse;    //所属仓库

    private Camera camera;          //关联抓拍摄像头

    private Receipt receipt;    //关联仓单对象


    @Id
    public String getNo() {
        return no;
    }

    public void setNo(String no) {
        this.no = no;
    }

    @ManyToOne
    @JoinColumn(name="warehouse_id")
    public Warehouse getWarehouse() {
        return warehouse;
    }

    public void setWarehouse(Warehouse warehouse) {
        this.warehouse = warehouse;
    }

    @ManyToOne
    @JoinColumn(name="camera_id")
    public Camera getCamera() {
        return camera;
    }

    public void setCamera(Camera camera) {
        this.camera = camera;
    }

    @ManyToOne
    @JoinColumn(name="receipt_no")
    public Receipt getReceipt() {
        return receipt;
    }

    public void setReceipt(Receipt receipt) {
        this.receipt = receipt;
    }
}
